import { Seeder } from '../../umzug';

const seedSmsVerification = [
  {
    id: 1,
    tel: '15305165114',
    vertication_code: '613742',
    created_at: new Date(),
    updated_at: new Date()
  },
  {
    id: 2,
    tel: '15625547446',
    vertication_code: '776543',
    created_at: new Date(),
    updated_at: new Date()
  }
];

export const up: Seeder = async ({ context: sequelize }) => {
  await sequelize
    .getQueryInterface()
    .bulkInsert('sms_verifications', seedSmsVerification);
};

export const down: Seeder = async ({ context: sequelize }) => {
  await sequelize.getQueryInterface().bulkDelete('sms_verifications',
    { id: seedSmsVerification.map((u) => u.id) });
};
